const mongoose = require('mongoose')
// mongoose.set('strictQuery',true)
mongoose.connect('mongodb://127.0.0.1:27017/bilibili')
mongoose.connection.once('open', () => {
	console.log('连接打开')
})
mongoose.connection.on('error', () => {
	console.log('连接失败')
})
mongoose.connection.on('close', () => {
	console.log('连接断开')
})

setTimeout(() => {
	mongoose.disconnect()
}, 2000);